$_SERVER["SCRIPT_URI"] not working? alternative?

Posted by Ahmad Fouad on Stack Overflow See other posts from Stack Overflow or by Ahmad Fouad
Published on 2009-04-04T21:44:33Z Indexed on 2010/04/25 15:23 UTC
Read the original article Hit count: 246

Filed under:

Hi,

This is odd, but for some reason the $_SERVER["SCRIPT_URI"] will not return the domain name when I am in child/sub-pages but will only work on the main page. Not sure if its due to the script (WordPress) or host, but please can you suggest any reliable solution to retrieve the domain name with PHP?

I am very thankful in advance, Regards

© Stack Overflow or respective owner

Related posts about php